<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/vue"></script>
</head>
<body>

<div id="app">
    <p v-text="context"></p>
    <button @click="reverse" >点击反转显示的内容</button>
</div>

<!-- v-on 指令添加一个事件监听器，通过它调用在 Vue 实例中定义的方法： -->

<script type="text/javascript">
    let vm = new Vue({
        el : "#app",
        data : {
            context : "Hello Vue!!!"
        },
        methods : {
            reverse : function () {
                this.context = this.context.split('').reverse().join('');
            }
        }
    })
</script>

</body>
</html>

